<extend name="Public/base"/>

<block name="body">
  <div class="main-title">
    <h2>{$meta_title}</h2>
  </div>
  <form action="{:U('addZone')}" method="post" class="form-horizontal">
    <div class="form-item">
      <label class="item-label">区域名称<span class="check-tips"></span></label>
      <div class="controls">
        <input type="text" class="text input-large" name="name" value="{$data.name|default=''}">
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">排序<span class="check-tips">（越大越靠前）</span></label>
      <div class="controls">
        <input type="text" class="text input-small" name="sort" value="{$data.sort|default=0}">
      </div>
    </div>
    <div class="form-item">
      <label class="item-label">状态<span class="check-tips">（禁用后，商户将无法单独设置属于该区域的地区运费，使用默认运费）</span></label>
      <div class="controls">
        <label class="radio"><input type="radio" value="1" name="status">正常</label>
        <label class="radio"><input type="radio" value="0" name="status">禁用</label>
      </div>
    </div>
    <div class="form-item">
      <input type="hidden" name="id" value="{$data.id|default=''}">
      <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
      <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
  </form>
</block>

<block name="script">
  <script type="text/javascript">
    //导航高亮
    highlight_subnav("{:U('zone')}");
    Core.setValue("status", {$data.status|default = 1});
  </script>
</block>